<?php
/**
{
    "mediaId": "INT //ID@noEdit; @noLoad; @search; ",
    "title": "VARCHAR //标题@search; ",
    "img": "VARCHAR //图片<br>500*400@image; ",
    "weixinMediaId": "VARCHAR //微信素材ID",
    "status": "TINYINT //状态@status; 3::正常::@admin; 88::删除::@admin; ",
    "created": "DATETIME //创建时间"
}
 */

class Media extends Base
{
    
	private $mediaId= '';//ID@noEdit;@noLoad;@search;
	private $title= NULL;//标题@search;
	private $img= '';//图片<br>500*400@image;
	private $weixinMediaId= NULL;//微信素材ID
	private $status= "3";//状态@status;3::正常::@admin;88::删除::@admin;
	private $created= 'CURRENT_TIMESTAMP';//创建时间

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_media';
    }
    
    public  function key(){
        return 'mediaId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return array (  0 => 'mediaId',);
    }
            
    public static  function deleteField()
    {
        return [];
    }
            
    public function className()
    {
        return 'Media';
    }
    
    public  function field()
    {
        return array (  'mediaId' =>   array (    0 => 'INT',    1 => 11,    2 => 'ID@noEdit;@noLoad;@search;',  ),  'title' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '标题@search;',  ),  'img' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '图片<br>500*400@image;',  ),  'weixinMediaId' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '微信素材ID',  ),  'status' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '状态@status;3::正常::@admin;88::删除::@admin;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建时间',  ),);
    }


}